var postId = "";
var arrayObj = new Array();
var arrayTitleNo = new Array();
$(function() {
	var thisURL = document.URL;
	var getval = thisURL.split('?')[1];
	postId = getval.split("=")[1];
	var str = "";
	var str1 = "";
	$.ajax({
		url : "../PostController/findByCondition.action",
		dataType : 'json',
		async : false,
		data : {
			"postId" : postId
		},
		success : function(data) {
			str = '<div class="panel panel-default">'
					+ '<div class="panel-heading">' + data[0].postTitle+ '(楼主)'
					+ "&nbsp;&nbsp;" + data[0].receiveTime + '</span>'
					+ '</div>' + '<div class="panel-body">'
					+ data[0].postContent +'</div>'
			$("#post_content").html(str);
		}
	});
	
	

	  $("#reply").click(
			function() {
			var str2 = '<form id="PostReplyForm" method="post" action="../PostReplyController/add.action">'
			   	+'<textarea type="text" name="postContent" id="postContent" rows="5" class="form-control" style="margin-top: 20px; margin-left: 20px; width:98%;;"placeholder="输入您的回复内容.."></textarea>'
				 +'<input type="hidden" name="postId2" value="'+postId+'">'
				 +'<button type="submit" id="submitReply" style="float:right; margin-top:10px;"class="btn btn-info" >发表</button>'
						+'</form>';
		    $("#post_content02").html(str2);
		});
});
